﻿using System;
using ServiceStack.DataAnnotations;

namespace NetSurveillance.WebApp.DataServices.Models
{
    [Serializable]
    public abstract class BaseModel
    {
        [Default(typeof(DateTime), "current_timestamp")]
        public DateTime CreatedTime { get; set; }

        [Default(typeof(DateTime), "current_timestamp")]
        public DateTime LastModifiedTime { get; set; }

        [Default(typeof(int), "1")]
        public int StatusToken { get; set; }

        protected BaseModel()
        {
            CreatedTime = DateTime.Now;
            LastModifiedTime = DateTime.Now;
            StatusToken = 1;
        }
    }
}